import {baseRequest} from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/cm` + url, ...arg)

export default {
	//分页查询首页轮播
	queryList(data) {
		return request('/' + data.pageNo + '/' + data.pageSize + '/listCarousel.do', {
			keyword: data.keyword,
			status: data.status
		}, "post")
	},
	//添加首页轮播
	addCarousel(data) {
		return request('/addCarousel.do', data, "post")
	},
	//查看首页轮播
	getCarousel(id) {
		return request('/' + id + '/getCarousel.do', null, "get")
	},
	//修改首页轮播
	editCarousel(data) {
		return request('/editCarousel.do', data, "post")
	},
	//删除首页轮播
	delCarousel(id) {
		return request('/' + id + '/delCarousel.do', null, "get")
	},
	//禁用首页轮播
	disCarousel(id) {
		return request('/' + id + '/disCarousel.do', null, "get")
	},
	//启用首页轮播
	startCarousel(id, index) {
		return request('/' + id + '/' + index + '/startCarousel.do', null, "get")
	},
	//升序
	adjustCarousel(id, index) {
		return request('/' + id + '/' + index + '/adjustCarouse.do', null, "get")
	},
	//降序
	descAdjustCarousel(id, index) {
		return request('/' + id + '/' + index + '/descAdjustCarouse.do', null, "get")
	},

}
